<template>
  <CardItem
    title="招商线索待跟进"
    :num="num"
    :icon="icon"
    @goMore="goMore"
  />
</template>

<script>
import { message } from "ant-design-vue";
import {
  defineComponent,
  reactive,
  ref,
  computed,
  watch,
  toRaw,
  toRefs,
} from "vue";
import utils from "@/common/utils/utils";
import request from "@/common/utils/request";
import CardItem from "@/views/home/components/CardItem.vue";
export default defineComponent({
  name: "ClueFollowUpCard",
  components: {CardItem},
  props: {

  },
  setup(props, context) {

    const state = reactive({
      num: 0,
      icon: utils.staticPath + `images/workbench/bussiness.jpg`,
    });

    const getData = () => {
      request.get("/org", "/business/clueField/getWaitFollowNumber").then((res) => {
        state.num = res?.data || 0;
      })
    };

    getData();

    const goMore = () => {
      window.microApp.forceDispatch({
        type: "SetMicroPages",
        microInfo: {
          microId: 'org_workbench_clueFoollowUp',
          app: 'org',
          name: "招商线索管理",
          url: '/village/clueManagement',
        }
      })
    };


    return {
      ...toRefs(state),
      goMore,
    };
  },
});


</script>

<style lang="less" scoped>

</style>
